dynamics_helper Module



Contents


Functions

public pure function cross_product(x, y) result(rst)

Computes the cross-product of a vector.

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: x(3)

The left-hand-side argument.

real(kind=real64), intent(in) :: y(3)

The right-hand-side argument

Return Value real(kind=real64), (3)

The resulting vector.

public pure function scalar_projection(x, y) result(rst)

Computes the projection of vector x onto vector y. The scalar projection is defined such that .

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in), dimension(:) :: x

The vector to project.

real(kind=real64), intent(in), dimension(size(x)) :: y

The vector onto which x should be projected.

Return Value real(kind=real64)

The scalar projection of x onto y.

public pure function to_skew_symmetric(x) result(rst)

Converts a 3-element vector to a 3-by-3 skew-symmetric matrix. A skew-symmetric matrix is defined as follows.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: x(3)

The vector.

Return Value real(kind=real64), (3,3)

The resulting skew-symmetric matrix.

public pure function vector_angle(x, y) result(rst)

Computes the angle between two vectors.

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in), dimension(:) :: x

The first vector.

real(kind=real64), intent(in), dimension(size(x)) :: y

The second vector.

Return Value real(kind=real64)

The angle, in radians.

public pure function vector_projection(x, y) result(rst)

Computes the vector pojection of vector x onto vector y. The vector projection is defined such that

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in), dimension(:) :: x

The vector to project.

real(kind=real64), intent(in), dimension(size(x)) :: y

The vector onto which x should be projected.

Return Value real(kind=real64), (3)

The vector projection of x onto y.